package com.lizemin.autoConfig.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;

/**
 * @author lzm
 * @date 2025/5/2 10:15
 * @description
 */
@Slf4j
@RequestMapping("/test")
@RestController
public class TestController {

    @Autowired
    DataSource dataSource;

    @GetMapping("/heart")
    public String heart() {
        return "ok";
    }

    @GetMapping("/dataSource")
    public void getDataSource() {
        log.info(dataSource.toString());
    }

}
